#include <AT89X52.h>
void Port1_0_Close()
{
P1=0x7F;
}
void Port1_0_Open()
{
P1=0x7F;P0=0x06;P3_6=0;
}
void Port1_1_Close()
{
P1=0xBF;P3_6=1;
}
void Port1_1_Open()
{
P1=0xBF;P0=0x5B;
}
void Port1_2_Close()
{
P1=0xDF;
}
void Port1_2_Open()
{
P1=0xDF;P0=0x4F;
}
void Port1_3_Close()
{
P1=0xEF;
}
void Port1_3_Open()
{
P1=0xEF;P0=0x66;
}
void Port1_4_Close()
{
P1=0xF7;
}
void Port1_4_Open()
{
P1=0xF7;P0=0x6D;
}
void Port1_5_Close()
{
P1=0xFB;
}
void Port1_5_Open()
{
P1=0xFB;P0=0x7D;
}
void Port1_6_Close()
{
P1=0xFD;
}
void Port1_6_Open()
{
P1=0xFD;P0=0x07;
}
void Port1_7_Close()
{
P1=0xFE;
}
void Port1_7_Open()
{
P1=0xFE;P0=0x7F;
}
void Delay()
{
int b;
for(b=30000;b>0;b--)
{
;
}
}

